import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component("myAspect")
@Aspect
public class MyAspect {



    //代表 AOP 包下的 任意类中的任意方法
    @Before(value = "execution(* aop.*.*(..))")
    public void before(){
        System.out.println("前置增强通知");
    }


    @After(value = "execution(public void aop.Target.save())")
    public void after(){
        System.out.println("后增强通知");
    }
}
